{% extends 'django_ledger/layouts/content_layout_1.html' %}
{% load i18n %}
{% load static %}
{% load django_ledger %}

{% block view_content %}
    <div class="columns is-centered">
        <div class="column is-6">
            <form action="{% url 'django_ledger:po-delete' entity_slug=view.kwargs.entity_slug po_pk=po_model.uuid %}"
                  method="post">
                {% csrf_token %}
                <div class="card">
                    <div class="card-content has-text-centered">
                        <p class="title has-text-weight-light">Are you sure you want to delete
                            Purchase Order {{ po_model.po_number }}</p>
                    </div>
                    <div class="card-content has-text-centered">
                        <p class="subtitle">All transactions associated with this Purchase Order will be deleted.
                            If you want to void the PO instead, click here</p>
                    </div>
                    <div class="card-content has-text-centered">
                        <a href="{% url 'django_ledger:po-detail' entity_slug=view.kwargs.entity_slug po_pk=po_model.uuid %}"
                           class="button is-primary">{% trans 'Go Back' %}</a>
                        <button type="submit" class="button is-danger">{% trans 'Delete' %}</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
{% endblock %}